FROM python:3.7
COPY . /var/www
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/\
    && pip config set install.trusted-host mirrors.aliyun.com\
    && mv /etc/apt/sources.list /etc/apt/sources.list.back\
    && echo 'deb http://mirrors.aliyun.com/debian buster main' >/etc/apt/sources.list\
    && echo 'deb http://mirrors.aliyun.com/debian-security buster/updates main' >>/etc/apt/sources.list\
    && echo 'deb http://mirrors.aliyun.com/debian buster-updates main' >>/etc/apt/sources.list\
    && apt update\
    && apt install vim -y\
    && pip install flask requests uwsgi pymysql\
    && mkdir /var/uwsgi\
    && touch /var/uwsgi/uwsgi.log
EXPOSE 5000
MAINTAINER shh
CMD cd /var/www\
    && uwsgi uwsgi.ini\
    && tail -f /var/uwsgi/uwsgi.log
